﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StreamInsightLinqPad.Samples;
using Microsoft.ComplexEventProcessing;
using Microsoft.ComplexEventProcessing.Linq;
using IntroHost.EventType;
using WcfInputAdapter;

namespace IntroHostDataContext
{
    public class IntroHostDataContext : StreamInsightContext
    {
        public IntroHostDataContext(Server server) : base(server)
        {

        }

        public CepStream <SimpleEventType> AdapterStream
        {
            get
            {
                var adapterConfig = new WcfInputAdapterConfing()
                {
                    CtiFrequency = 1
                };

                var inputStream = CepStream<SimpleEventType>.Create(Application, 
                    "inputStream", 
                    typeof(WcfInputAdapterFactory), 
                    adapterConfig, 
                    EventShape.Point);
                
                return inputStream;
            }

        }
    }
}
